import { Component, ElementRef, TemplateRef, ViewChild } from '@angular/core';
import { SunshineEmptyComponent } from './sunshine-empty/sunshine-empty.component';
import { SunshineNgZorroAntdModule } from '../../../ng-zorro-module';
import { MyDerirective01Directive } from '../../directives/my-derirective01.directive';

@Component({
  selector: 'app-template-variable',
  standalone: true,
  imports: [SunshineNgZorroAntdModule, SunshineEmptyComponent, MyDerirective01Directive
  ],
  templateUrl: './template-variable.component.html',
  styleUrls: []
})
export class TemplateVariableComponent {
  // 模板变量
  @ViewChild('empty', { static: true }) empty?: SunshineEmptyComponent;
  @ViewChild('die', { static: true }) my?: HTMLHtmlElement;
  @ViewChild('ngTemp1', { static: true }) ngTempl1?: TemplateRef<HTMLDivElement>;
  firstExample: string = '';

  callPhone(val: string) {
    alert(val)
    console.log(this.empty?.phoneNumber)
    console.log(this.my?.outerText)
    console.log(this.ngTempl1)
  }



}
